package com.changgou.search.controller;

import com.changgou.entity.Result;
import com.changgou.entity.StatusCode;
import com.changgou.search.service.ESManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/manager")
@RestController
public class ESManagerController {
    @Autowired
    private ESManagerService skuSearchService;

    @GetMapping("/importAll")
    public Result importAll() {
        skuSearchService.importAll();
        return new Result(true, StatusCode.OK,"创建索引库结构成功");
    }


}
